﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace GlobalObjects
{
    [DataContract, Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    public class Sensor
    {
        [DataMember, Newtonsoft.Json.JsonProperty]
        public int Id { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public int Deviceid { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Name { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Type { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Make { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Interval_measure { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Interval_send { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Metadata { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public Boolean Status { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public int Fault_tolerance { get; set; }

    }
    [DataContract, Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    public class SensorRegistrationResponse
    {
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Deviceid { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Id { get; set; }
 
    }

    [DataContract, Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    public class SensorRegistrationRequest
    {
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Name { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Type { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Make { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Interval_measure { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public int Fault_tolerance { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Interval_send { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Metadata { get; set; }
    }
}
